import http from "../../utility/request.js";
const baseUrl = "http://47.109.157.141:8449/front";
// const baseUrl = process.env.NODE_ENV === "development" ? "https://tpost.relaverse.cn/qsxz/sleep" : "https://tpost.relaverse.cn/qsxz/sleep"; // 轻松睡眠后台服务

export const healthCal = (monthStr) =>
	http.get(`/rgUserRingReport/healthCal`, {
		baseUrl,
		data: {
			monthStr,
		},
	});

export const getLatestUpdateTime = () =>
	http.get("/rgUserRing/queryFieldLatestUpdateTime", {
		baseUrl,
	});

export const batchSaveRingData = (data) =>
	http.post("/rgUserRing/saveRingDataList", {
		baseUrl,
		data,
		timeout: 10 * 60 * 1000,
	});

//是否需要获取积分
export const needReceiveAward = (data) =>
	http.post("/rgUserRing/needReceiveAward", {
		baseUrl,
		data,
	});

export const receiveAward = (data) =>
	http.post("/rgUserRing/receiveAward", {
		baseUrl,
		data,
	});

export const getHeatBeatData = (data) =>
	http.get("/rgUserRingReport/getHeatBeatData", {
		baseUrl,
		data,
	});

export const getBloodData = (data) =>
	http.get("/rgUserRingReport/getBloodData", {
		baseUrl,
		data,
	});

export const getPressureData = (data) =>
	http.get("/rgUserRingReport/getPressureData", {
		baseUrl,
		data,
	});
